<?php

$dbc = mysqli_connect ('localhost', 'root', 'root', 'stuinfo');

mysqli_set_charset($dbc, 'utf8mb4');

$query = "SELECT * from info";

$r = mysqli_query($dbc, $query);

while ($row = mysqli_fetch_array($r)) {
     echo '<pre>';
     var_dump($row);
     echo '</pre>';
 }

echo '<pre>';
var_dump($r);
echo '</pre>';